
//物流公司信息
import request from '@/utils/request1'
// 查询物流公司信息列表

export function logisticsCompanyList(query) {
  return request({
    url: '/logistics/company/list',
    method: 'get',

    params: query
  })
}
// 新增物流公司信息

export function addLogisticsCompany(data) {
    return request({
      url: '/logistics/company/add',
      method: 'post',
      data: data
    })
  }
//   修改物流公司信息
  export function updateLogisticsCompany(data) {
    return request({
      url: '/logistics/company/edit',
      method: 'put',
      data: data
    })
  }
  // 删除物流公司 ?待对接
  export function delLogisticsCompany(ids) {
    return request({
      url: '/logistics/company/' + ids,
      method: 'delete'
    })
  }
//   获取详细信息
  export function getLogisticsCompanyDetail(roleId) {
    return request({
      url: '/logistics/company/' + roleId,
      method: 'get'
    })
  }
  // 修改物流公司启用状态 ？待对接
  // /logistics/company/editEnabled/1,2,3/1
  export function setLogisticsCompanyEditEnabled(data) {
    return request({
      url: '/logistics/company/audited/' + data.ids +'/'+data.isEnabled,
      method: 'put'
    })
  }

//   批量修改物流公司信息 (禁启用操作使用） 

export function updateLogisticsCompanyList(data) {
    return request({
      url: '/logistics/company/updateCompanyList',
      method: 'post',
      data,
    })
  }

//   物流公司审核
export function setLogisticsCompanyAudited(data) {
    return request({
      url: '/logistics/company/audited',
      method: 'put',
      data
    })
  }
//   logistics/company/fuzzySearch
// 查询企业 模糊查询

export function logisticsCompanyFuzzySearch(query) {
    return request({
      url: '/logistics/company/fuzzySearch',
      method: 'get',
  
      params: query
    })
  }
//   查询物流公司所属的状态数量
// 
export function logisticsCompanyStatus() {
    return request({
      url: '/logistics/company/status',
      method: 'get',
  
    //   params: query
    })
  }
// 新增物流公司关联车辆
export function logisticsCompanyAddRelate(data) {
    return request({
      url: '/logistics/company/addRelate',
      method: 'post',
      data
    })
  }
// 查询物流公司关联车辆关系信息
export function logisticsCompanyQueryRelate(query) {
    return request({
      url: '/logistics/company/queryRelate',
      method: 'get',
      params:query
    })
  }
// 查询车辆下关联的物流公司
  // 
  export function logisticsVehicleInfoQueryRelate(query) {
    return request({
      url: '/logistics/vehicleInfo/queryRelate',
      method: 'get',
      params:query
    })
  }
const obj = {
    logisticsCompanyList, 
    logisticsCompanyStatus,
    addLogisticsCompany,
    updateLogisticsCompany,
    delLogisticsCompany,
    getLogisticsCompanyDetail,
    setLogisticsCompanyEditEnabled,
    setLogisticsCompanyAudited,
    updateLogisticsCompanyList,
    logisticsCompanyFuzzySearch,
    logisticsCompanyAddRelate,
    logisticsCompanyQueryRelate,
    logisticsVehicleInfoQueryRelate
}
export default obj 